/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tp_sd_base;

import java.io.Serializable;

/**
 *
 * @author kill9
 */
public class Set<K,V> implements Serializable{

    private K key;

    private V value;

    public Set() {
    }

    public Set(K key, V value) {
        this.key = key;
        this.value = value;
    }

    

    public K getKey() {
        return key;
    }

    public V getValue() {
        return value;
    }

    public void setValue(V value) {
        this.value = value;
    }

    public void setKey(K key) {
        this.key = key;
    }

    @Override
    public String toString() {
        return key+"\t ("+value+")";
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Set<K, V> other = (Set<K, V>) obj;
        if (this.key != other.key && (this.key == null || !this.key.equals(other.key))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 23 * hash + (this.key != null ? this.key.hashCode() : 0);
        return hash;
    }




}
